home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / misc / guigfxlib.lha / GuiGFXLib / doc / autodoc / guigfx.doc < prev    next >
Encoding:
Text File  |  2000-01-23  |  77.9 KB  |  2,114 lines

  1. TABLE OF CONTENTS
  2.  
  3. guigfx.library/AddPaletteA
  4. guigfx.library/AddPictureA
  5. guigfx.library/AddPixelArrayA
  6. guigfx.library/ClonePictureA
  7. guigfx.library/CreateDirectDrawHandleA
  8. guigfx.library/CreatePenShareMapA
  9. guigfx.library/CreatePictureBitMapA
  10. guigfx.library/CreatePictureMaskA
  11. guigfx.library/DeleteDirectDrawHandle
  12. guigfx.library/DeletePenShareMap
  13. guigfx.library/DeletePicture
  14. guigfx.library/DirectDrawTrueColorA
  15. guigfx.library/DoPictureMethodA
  16. guigfx.library/DrawPictureA
  17. guigfx.library/GetPictureAttrsA
  18. guigfx.library/IsPictureA
  19. guigfx.library/LoadPictureA
  20. guigfx.library/LockPictureA
  21. guigfx.library/MakePictureA
  22. guigfx.library/ObtainDrawHandleA
  23. guigfx.library/ReadPictureA
  24. guigfx.library/ReleaseDrawHandle
  25. guigfx.library/RemColorHandle
  26. guigfx.library/UnLockPicture
  27. guigfx.library/AddPaletteA                         guigfx.library/AddPaletteA
  28.  
  29.     NAME
  30.         AddPaletteA - add a palette's colors to a pen-sharemap.
  31.         AddPalette  - varargs stub for AddPaletteA.
  32.  
  33.     SYNOPSIS
  34.         colorhandle = AddPaletteA(psm,palette,taglist)
  35.         d0                        a0  a1      a2
  36.  
  37.         APTR AddPaletteA(APTR,APTR,struct TagItem *)
  38.         
  39.         APTR AddPalette(APTR,APTR,tag,...,TAG_DONE)
  40.  
  41.     FUNCTION
  42.         This function adds a palette's colors to a pen-sharemap.
  43.  
  44.     INPUTS
  45.         psm         - pointer to a pen-sharemap
  46.         palette     - pointer to a color table
  47.         tags        - pointer to an array of TagItems
  48.  
  49.     TAGS
  50.         GGFX_PaletteFormat (ULONG) - format of the palette. Currently
  51.                 defined are:
  52.                       
  53.                 PALFMT_RGB8
  54.                         ULONG 0x00rrggbb
  55.  
  56.                 PALFMT_RGB32
  57.                         ULONG red,green,blue. This is the LoadRGB32()
  58.                         format without trailing longword.
  59.  
  60.                 Default: PALFMT_RGB8
  61.                 
  62.         GGFX_NumColors (ULONG) - number of colors in the color table.
  63.                 Currently, this argument is mandatory. Default: 0
  64.         
  65.         GGFX_Weight (ULONG) - weight factor. Valid range: 1...255.
  66.                 With this factor, you can specify a significance
  67.                 for this color instance. The higher this value, the
  68.                 higher the palette's influence on the pen-sharemap.
  69.                 Default: 1
  70.  
  71.     RESULTS
  72.         colorhandle - identifier for a particular dependency between
  73.                       color information and pen-sharemap. there is
  74.                       no need for you to store a colorhandle, unless
  75.                       you want to manually remove it from the pen-sharemap
  76.                       via RemColorHandle(). NULL if something went wrong.
  77.  
  78.     NOTES
  79.         An example is provided with the documentation for AddPictureA().
  80.  
  81.     SEE ALSO
  82.         RemColorHandle(), AddPictureA(), AddPixelArrayA(),
  83.         CreatePenShareMapA(), DeletePenShareMap(), ObtainDrawHandleA()
  84.  
  85.  
  86. guigfx.library/AddPictureA                         guigfx.library/AddPictureA
  87.  
  88.     NAME
  89.         AddPictureA - add a picture's color information to a pen-sharemap.
  90.         AddPicture  - varargs stub for AddPictureA.
  91.  
  92.     SYNOPSIS
  93.         colorhandle = AddPictureA(psm,picture,taglist)
  94.         d0                        a0  a1      a2
  95.  
  96.         APTR AddPictureA(APTR,APTR,struct TagItem *)
  97.         
  98.         APTR AddPicture(APTR,APTR,tag,...,TAG_DONE)
  99.  
  100.     FUNCTION
  101.         This function adds a picture's color information to
  102.         a pen-sharemap.
  103.  
  104.     INPUTS
  105.         psm         - pointer to a pen-sharemap
  106.         picture     - pointer to a picture
  107.         tags        - pointer to an array of TagItems
  108.  
  109.     TAGS
  110.         GGFX_Weight (ULONG) - weight factor. Valid range: 1...255.
  111.                 With this factor, you can specify a significance
  112.                 for this color instance. The higher this value, the
  113.                 higher the picture's influence on the pen-sharemap.
  114.                 Default: 1
  115.         
  116.     RESULTS
  117.         colorhandle - identifier for a particular dependency between
  118.                       color information and pen-sharemap. there is
  119.                       no need for you to store a colorhandle, unless
  120.                       you want to manually remove it from the pen-sharemap
  121.                       via RemColorHandle(). NULL if something went wrong.
  122.  
  123.     EXAMPLE
  124.         Assume there were three different pictures to be drawn.
  125.  
  126.         a) a noisy background
  127.         b) a logo of your company
  128.         c) navigation icons
  129.  
  130.         you might want to differenciate the significances for these 
  131.         pictures as follows:
  132.  
  133.         AddPicture(psm, backpic, GGFX_Weight, 2, TAG_DONE);
  134.         AddPicture(psm, logopic, GGFX_Weight, 3, TAG_DONE);
  135.         AddPicture(psm, navpic, GGFX_Weight, 5, TAG_DONE);
  136.  
  137.         the backpic's influence on the allocated pens would be 20%, the logo
  138.         contributed with 30%, and the navigation buttons would be taken into
  139.         account with 50% then.
  140.  
  141.     NOTES
  142.         
  143.     SEE ALSO
  144.         RemColorHandle(), AddPaletteA(), AddPixelArrayA(),
  145.         CreatePenShareMapA(), DeletePenShareMap(), ObtainDrawHandleA()
  146.  
  147.  
  148. guigfx.library/AddPixelArrayA                   guigfx.library/AddPixelArrayA
  149.  
  150.     NAME
  151.         AddPixelArrayA - add a pixel array's color information to a
  152.                          pen-sharemap.
  153.         AddPixelArray  - varargs stub for AddPixelArrayA.
  154.  
  155.     SYNOPSIS
  156.         colorhandle = AddPixelArrayA(psm,array,width,height,taglist)
  157.         d0                           a0  a1    d0    d1     a2
  158.  
  159.         APTR AddPixelArrayA(APTR,APTR,UWORD,UWORD,struct TagItem *)
  160.         
  161.         APTR AddPixelArray(APTR,APTR,UWORD,UWORD,tag,...,TAG_DONE)
  162.  
  163.     FUNCTION
  164.         This function adds a pixel array's color information to a
  165.         pen-sharemap.
  166.  
  167.     INPUTS
  168.         psm         - pointer to a pen-sharemap
  169.         pixelarray  - pointer to a pixel array
  170.         width       - pixel array's width [pixels]
  171.         height      - pixel array's height [rows]
  172.         tags        - pointer to an array of TagItems
  173.  
  174.     TAGS
  175.         GGFX_PixelFormat (ULONG) - pixel format. Currently defined are
  176.  
  177.                 PIXFMT_CHUNKY_CLUT
  178.                         chunky bytes, directly acting as indices
  179.                         to a color-lookup-table. You must specify the
  180.                         GGFX_Palette and GGFX_NumColors tags as well.
  181.                 
  182.                 PIXFMT_0RGB_32
  183.                         truecolor pixels (ULONG 0x00rrggbb).
  184.  
  185.                 Default: PIXFMT_CHUNKY_CLUT               
  186.  
  187.         GGFX_Palette (APTR) - pointer to a color table. Mandatory for
  188.                 PIXFMT_CHUNKY_CLUT (see above).
  189.                 Default: none
  190.  
  191.         GGFX_NumColors (ULONG) - number of colors in the color table.
  192.                 Mandatory for PIXFMT_CHUNKY_CLUT (see above).
  193.                 Default: none
  194.  
  195.         GGFX_PaletteFormat (ULONG) - format of the palette. Currently
  196.                 defined are:
  197.                       
  198.                 PALFMT_RGB8
  199.                         ULONG 0x00rrggbb
  200.  
  201.                 PALFMT_RGB32
  202.                         ULONG red,green,blue. This is the LoadRGB32()
  203.                         format without trailing longword.
  204.  
  205.                 Default: PALFMT_RGB8
  206.  
  207.         GGFX_Weight (ULONG) - weight factor. Valid range: 1...255.
  208.                 With this factor, you can specify a significance
  209.                 for this color instance. The higher this value, the
  210.                 higher the pixel array's influence on the pen-sharemap.
  211.                 Default: 1
  212.         
  213.     RESULTS
  214.         colorhandle - identifier for a particular dependency between
  215.                       color information and pen-sharemap. there is
  216.                       no need for you to store a colorhandle, unless
  217.                       you want to manually remove it from the pen-sharemap
  218.                       via RemColorHandle(). NULL if something went wrong.
  219.  
  220.     NOTES
  221.         An example is provided with the documentation for AddPictureA().
  222.  
  223.     SEE ALSO
  224.         RemColorHandle(), AddPaletteA(), AddPictureA(),
  225.         CreatePenShareMapA(), DeletePenShareMap(), ObtainDrawHandleA()
  226.  
  227.  
  228. guigfx.library/ClonePictureA                     guigfx.library/ClonePictureA
  229.  
  230.     NAME
  231.         ClonePictureA - create a duplicate from a picture.
  232.         ClonePicture  - varargs stub for ClonePictureA.
  233.  
  234.     SYNOPSIS
  235.         newpicture = ClonePictureA(picture,taglist)
  236.         d0                         a0      a1
  237.  
  238.         APTR ClonePictureA(APTR,struct TagItem *)
  239.         
  240.         APTR ClonePicture(APTR,tag,...,TAG_DONE)
  241.  
  242.     FUNCTION
  243.         This function creates a duplicate from a picture. Memory will
  244.         be allocated, and the picture will be copied including all its
  245.         attributes. Optionally, the picture is cloned only in part.
  246.  
  247.     INPUTS
  248.         picture     - pointer to a picture
  249.         tags        - pointer to an array of TagItems
  250.  
  251.     TAGS
  252.         GGFX_SourceX (ULONG)
  253.                 left edge inside the picture where to fetch the pixels
  254.                 from [pixels]. Default: 0.
  255.  
  256.         GGFX_SourceY (ULONG)
  257.                 top edge inside the picture where to fetch the pixels
  258.                 from [rows]. Default: 0.
  259.  
  260.         GGFX_SourceWidth (ULONG)
  261.                 width of an area inside the picture [pixels].
  262.                 Default: The picture's width.
  263.  
  264.         GGFX_SourceHeight (ULONG)
  265.                 height of an area inside the picture [rows].
  266.                 Default: The picture's height.
  267.  
  268.         GGFX_DestWidth (ULONG)
  269.                 width of the new picture [pixels].
  270.                 Default: The picture's width.
  271.  
  272.         GGFX_DestHeight (ULONG)
  273.                 height of the new picture [rows].
  274.                 Default: The picture's height.
  275.  
  276.     RESULTS
  277.         newpicture  - a vanilla copy of the specified picture (or a
  278.                       part of it), or NULL if there was not enough memory
  279.                       available.
  280.  
  281.     SEE ALSO
  282.         MakePictureA(), DeletePicture()
  283.  
  284.  
  285. guigfx.library/CreateDirectDrawHandleA guigfx.library/CreateDirectDrawHandleA
  286.  
  287.     NAME
  288.         CreateDirectDrawHandleA - derive a handle for 'direct' drawing (v9)
  289.         CreateDirectDrawHandle  - varargs stub for CreateDirectDrawHandleA
  290.     
  291.     SYNOPSIS
  292.         ddh = CreateDirectDrawHandleA(drawhandle,sourcewidth,sourceheight,
  293.                                       a0        d0          d1
  294.                                       destwidth,destheight,taglist) 
  295.                                       d2        d3         a1
  296.  
  297.         APTR CreateDirectDrawHandleA(APTR,UWORD,UWORD,UWORD,UWORD,
  298.                                      struct TagItem *)
  299.  
  300.         APTR CreateDirectDrawHandle(APTR,UWORD,UWORD,UWORD,UWORD,
  301.                                     Tag,...,TAG_DONE)
  302.  
  303.     FUNCTION
  304.         Derive a handle from a drawhandle for highly optimized
  305.         ('direct') drawing function calls. Currently only truecolor
  306.         data (PIXFMT_0RGB_32) are supported.
  307.  
  308.     INPUTS
  309.         drawhandle   - drawhandle from which to derive a directdrawhandle
  310.         sourcewidth  - source width [pixels]
  311.         sourceheight - source height [rows]
  312.         destwidth    - dest width [pixels]
  313.         destheight   - dest height [rows]
  314.         tags         - pointer to an array of TagItems
  315.  
  316.     TAGS
  317.         GGFX_PixelFormat - type of pixels to be processed. Currently
  318.              only PIXFMT_0RGB_32 is supported.
  319.              Default: PIXFMT_0RGB_32
  320.  
  321.     RESULTS
  322.          ddh   - a direct-drawhandle, an object that can be passed
  323.                  to DirectDrawTrueColorA()
  324.  
  325.     NOTES
  326.          You must free the direct-drawhandle with a matching call
  327.          to DeleteDirectDrawHandle(). You are not allowed to free
  328.          the underlying drawhandle before the direct-drawhandle.
  329.          The consequences might be fatal.
  330.  
  331.     SEE ALSO
  332.         DeleteDirectDrawHandle(), DirectDrawTrueColorA(),
  333.         ObtainDrawHandleA()
  334.  
  335.  
  336. guigfx.library/CreatePenShareMapA           guigfx.library/CreatePenShareMapA
  337.  
  338.     NAME
  339.         CreatePenShareMapA - create a screen-pen manager.
  340.         CreatePenShareMap  - varargs stub for CreatePenShareMapA.
  341.  
  342.     SYNOPSIS
  343.         psm = CreatePenShareMapA(taglist)
  344.         d0                       a0
  345.  
  346.         APTR CreatePenShareMapA(struct TagItem *)
  347.         
  348.         APTR CreatePenShareMap(tag,...,TAG_DONE)
  349.  
  350.     FUNCTION
  351.         This function creates a screen-pen manager.
  352.  
  353.     INPUTS
  354.         tags        - pointer to an array of TagItems
  355.  
  356.     TAGS
  357.         GGFX_HSType (ULONG) - internal histogram type, according to
  358.                 the histogram types defined in render/render.h.
  359.                 Better you never touch this tag, unless you know exactly
  360.                 what you are doing. Also consider reading the 'memory' text
  361.                 file supplied with the render.library distribution.
  362.                 Default: HSTYPE_12BIT_TURBO
  363.         
  364.     RESULTS
  365.         psm   - a pen-sharemap ready for usage or NULL if there was not
  366.                 enough memory available.
  367.  
  368.     NOTES
  369.         The term 'pen-sharemap' might be confusing and has been
  370.         maintained for consistency reasons. It is actually a
  371.         histogram that collects color statistics. When a
  372.         pen-sharemap is passed to ObtainDrawHandleA(), it allows
  373.         to calculate a very specific palette.
  374.         
  375.     SEE ALSO
  376.         DeletePenShareMap(), ObtainDrawHandleA(), AddPictureA(),
  377.         AddPaletteA(), AddPixelArrayA()
  378.  
  379.  
  380. guigfx.library/CreatePictureBitMapA       guigfx.library/CreatePictureBitMapA
  381.  
  382.     NAME
  383.         CreatePictureBitMapA - create a BitMap from a picture.
  384.         CreatePictureBitMap  - varargs stub for CreatePictureBitMapA.
  385.  
  386.     SYNOPSIS
  387.         bitmap = CreatePictureBitMapA(drawhandle,picture,tags)
  388.         d0                            a0         a1      a2
  389.  
  390.         struct BitMap *CreatePictureBitMapA(APTR,APTR,struct TagItem *)
  391.  
  392.         struct BitMap *CreatePictureBitMap(APTR,APTR,tag,...,TAG_DONE)
  393.  
  394.     FUNCTION
  395.         This function creates a BitMap from a drawhandle and from
  396.         a picture. This BitMap will be applicable to the drawhandle's
  397.         RastPort and ColorMap, i.e. it may use colors allocated with
  398.         the drawhandle, and can be blitted efficiently to the RastPort
  399.         with graphics.library functions.
  400.         
  401.         If the picture argument is ommitted (i.e. NULL), then this
  402.         function creates a blank, displayable BitMap that can be
  403.         blitted efficiently to the drawhandle's RastPort. Note: The
  404.         tags GGFX_DestWidth and GGFX_DestHeight are mandatory if no
  405.         picture is specified, and all other tags will be ignored. (v15)
  406.         
  407.         Note: The BitMap structure must be freed with
  408.         graphics.library/FreeBitMap().
  409.  
  410.     INPUTS
  411.         drawhandle  - pointer to a drawhandle from ObtainDrawHandleA()
  412.         picture     - pointer to a picture, or NULL.
  413.         tags        - pointer to an array of TagItems
  414.  
  415.     TAGS
  416.         GGFX_DestWidth (ULONG)
  417.                 destination width for the BitMap [pixels].
  418.                 Mandatory if no picture is supplied.
  419.                 Default: the picture's width.
  420.  
  421.         GGFX_DestHeight (ULONG)
  422.                 destination height for the BitMap [rows].
  423.                 Mandatory if no picture is supplied.
  424.                 Default: the picture's height.
  425.  
  426.         GGFX_SourceX (ULONG)
  427.                 left edge inside the picture where to fetch the pixels
  428.                 from [pixels]. Default: 0.
  429.  
  430.         GGFX_SourceY (ULONG)
  431.                 top edge inside the picture where to fetch the pixels
  432.                 from [rows]. Default: 0.
  433.  
  434.         GGFX_SourceWidth (ULONG)
  435.                 width of an area inside the picture [pixels].
  436.                 Default: The picture's width.
  437.  
  438.         GGFX_SourceHeight (ULONG)
  439.                 height of an area inside the picture [rows].
  440.                 Default: The picture's height.
  441.  
  442.         GGFX_CallBackHook (struct Hook *)
  443.                 pointer to a callback Hook structure. The associated
  444.                 callback function will be called from time to time
  445.                 while the picture is being rendered to the BitMap.
  446.                 The callback has to return TRUE for continuation or FALSE
  447.                 for abortion. It will be submitted a pointer to the
  448.                 picture for the object, and a message of the following
  449.                 type:
  450.  
  451.                         ULONG GGFX_MSGTYPE_LINEDRAWN
  452.                         ULONG line_number
  453.                 
  454.                 Also refer to the example provided with DrawPictureA().
  455.                 Default: NULL.
  456.  
  457.         GGFX_DitherMode (ULONG) - dither mode. Currently available are:
  458.  
  459.                 DITHERMODE_NONE
  460.                         no dithering at all
  461.                 
  462.                 DITHERMODE_FS
  463.                         Floyd-Steinberg dithering
  464.                         
  465.                 DITHERMODE_RANDOM
  466.                         Random dithering. This mode is significantly
  467.                         slower than Floyd-Steinberg dithering.
  468.  
  469.                 DITHERMODE_EDD
  470.                         EDD dithering. This mode is faster than
  471.                         Floyd-Steinberg dithering.
  472.  
  473.                 Default: The drawhandle's dithermode.
  474.  
  475.         GGFX_DitherAmount (ULONG) - dither amount. Valid range: 0...255.
  476.                 Currently, this value is of any use only for
  477.                 DITHERMODE_RANDOM. Default: The drawhandle's dither amount.
  478.  
  479.         GGFX_AutoDither (BOOL) - automatic dither activation.
  480.                 temporarily overrides the drawhandle's autodither
  481.                 state - see ObtainDrawHandleA().
  482.                 default: the drawhandle's autodither state. (v17)
  483.  
  484.     RESULTS
  485.         bitmap     - a BitMap structure ready for being blitted to
  486.                      the RastPort via graphics.library/BltBitMapRastPort(),
  487.                      or NULL if there was not enough memory available.
  488.  
  489.     SEE ALSO
  490.         ObtainDrawHandleA(), DrawPictureA(), graphics.library/FreeBitMap(),
  491.         graphics.library/BltBitMapRastPort(), CreatePictureMaskA()
  492.  
  493.  
  494. guigfx.library/CreatePictureMaskA           guigfx.library/CreatePictureMaskA
  495.  
  496.     NAME
  497.         CreatePictureMaskA - create a mask from a picture. (v15)
  498.         CreatePictureMask  - varargs stub for CreatePictureMaskA.
  499.  
  500.     SYNOPSIS
  501.         success = CreatePictureMaskA(picture,array,bytewidth,tags)
  502.         d0                           a0      a1    d0        a2
  503.  
  504.         BOOL CreatePictureMaskA(APTR,UBYTE *,UWORD,struct TagItem *)
  505.  
  506.         BOOL CreatePictureMask(APTR,UBYTE *,UWORD,tag,...,TAG_DONE)
  507.  
  508.     FUNCTION
  509.         This function creates a single-bitplane mask from a picture's
  510.         alpha-channel. This mask can be passed to e.g.
  511.         graphics.library/BltMaskBitMapRastPort() for masked blitting.
  512.         
  513.         If the picture contains no alpha-channel, the resulting
  514.         mask will be completely opaque, i.e. all bits will be set.
  515.         
  516.         Use GGFX_Ratio to specify a threshold. Alpha-channel values
  517.         below this threshold will be rendered to a clear bit, values
  518.         greater or equal to a set bit.
  519.         
  520.         The array argument must point to a single bitplane, with an
  521.         alignment according to ((width+15)>>4)<<1. The bytewidth must
  522.         be an even number.
  523.         
  524.         Optionally, the alpha-channel is scaled to the resulting
  525.         bitplane.
  526.  
  527.     INPUTS
  528.         picture     - pointer to a picture
  529.         array       - pointer to a single bitplane. reserve at least
  530.                       (((width+15)>>4)<<1)*height bytes.
  531.         bytewidth   - total width of the bitplane array [bytes]
  532.         tags        - pointer to an array of TagItems
  533.  
  534.     TAGS
  535.         GGFX_DestWidth (ULONG)
  536.                 destination width to be used in the resulting
  537.                 bitplane [pixels]. Default: the picture's width.
  538.  
  539.         GGFX_DestHeight (ULONG)
  540.                 destination height to be used in the resulting
  541.                 bitplane [rows]. Default: the picture's height.
  542.  
  543.         GGFX_SourceX (ULONG)
  544.                 left edge inside the picture where to fetch the
  545.                 alpha-channel from [pixels]. Default: 0.
  546.  
  547.         GGFX_SourceY (ULONG)
  548.                 top edge inside the picture where to fetch the
  549.                 alpha-channel from [rows]. Default: 0.
  550.  
  551.         GGFX_SourceWidth (ULONG)
  552.                 width of an area inside the picture [pixels].
  553.                 Default: The picture's width.
  554.  
  555.         GGFX_SourceHeight (ULONG)
  556.                 height of an area inside the picture [rows].
  557.                 Default: The picture's height.
  558.  
  559.         GGFX_Ratio (ULONG) - threshold. Alpha-channel values
  560.                 greater or equal this threshold will appear as
  561.                 a set bit. Default: 128
  562.  
  563.     RESULTS
  564.         success    - boolean, FALSE if there was not enough
  565.                      memory for intermediate buffers
  566.  
  567.     SEE ALSO
  568.         CreatePictureBitMapA(), graphics.library/BltMaskBitMapRastPort()
  569.  
  570.  
  571. guigfx.library/DeleteDirectDrawHandle   guigfx.library/DeleteDirectDrawHandle
  572.  
  573.     NAME
  574.         DeleteDirectDrawHandle - remove a direct-drawhandle. (v9)
  575.     
  576.     SYNOPSIS
  577.         DeleteDirectDrawHandle(ddh)
  578.                                a0
  579.  
  580.         void DeleteDirectDrawHandle(APTR)
  581.  
  582.     FUNCTION
  583.         this function deletes a direct-drawhandle object and frees
  584.         all associated memory.
  585.  
  586.     INPUTS
  587.         ddh - a direct-drawhandle, created with CreateDirectDrawHandleA()
  588.  
  589.     RESULTS
  590.         none
  591.  
  592.     SEE ALSO
  593.         CreateDirectDrawHandleA()
  594.  
  595.  
  596. guigfx.library/DeletePenShareMap             guigfx.library/DeletePenShareMap
  597.  
  598.     NAME
  599.         DeletePenShareMap - dispose a pen-sharemap.
  600.  
  601.     SYNOPSIS
  602.         DeletePenShareMap(psm)
  603.                           a0
  604.  
  605.         void DeletePenShareMap(APTR)
  606.  
  607.     FUNCTION
  608.         This function discards a pen-sharemap and frees all associated
  609.         memory and colorhandles.
  610.  
  611.     INPUTS
  612.         psm      - pointer to a pen-sharemap to be deleted.
  613.         
  614.     SEE ALSO
  615.         CreatePenShareMapA(), RemColorHandle()
  616.  
  617.  
  618. guigfx.library/DeletePicture                     guigfx.library/DeletePicture
  619.  
  620.     NAME
  621.         DeletePicture - dispose a picture.
  622.  
  623.     SYNOPSIS
  624.         DeletePicture(picture)
  625.                       a0
  626.  
  627.         void DeletePicture(APTR)
  628.  
  629.     FUNCTION
  630.         This function discards a picture and frees all associated
  631.         memory.
  632.  
  633.     INPUTS
  634.         picture    - pointer to a picture to be deleted.
  635.         
  636.     SEE ALSO
  637.         MakePictureA()
  638.  
  639.  
  640. guigfx.library/DirectDrawTrueColorA       guigfx.library/DirectDrawTrueColorA
  641.  
  642.     NAME
  643.         DirectDrawTrueColorA - draw truecolor data. (v9)
  644.         DirectDrawTrueColor - varargs stub for DirectDrawTrueColorA.
  645.  
  646.     SYNOPSIS
  647.         success = DirectDrawTrueColorA(directdrawhandle,array,x, y,
  648.         d0                             a0               a1    d0 d1
  649.                                        taglist)
  650.                                        a2
  651.  
  652.         BOOL DirectDrawTrueColorA(APTR,ULONG *,UWORD,UWORD,
  653.                                   struct TagItem *)
  654.  
  655.         BOOL DirectDrawTrueColor(APTR,ULONG *,UWORD,UWORD,Tag,...,
  656.                                  TAG_DONE)
  657.  
  658.     FUNCTION
  659.         Draw an array of truecolor data of the type PIXFMT_0RGB_32 to the
  660.         RastPort associated with a direct-drawhandle's parent drawhandle.
  661.         This function has got very few overhead and writes (or renders)
  662.         the data as straightforward as possible.
  663.  
  664.     INPUTS
  665.         directdrawhandle - an object derived from a drawhandle via
  666.                            CreateDirectDrawHandleA()
  667.         array            - pointer to an array of data of the type
  668.                            PIXFMT_0RGB_32
  669.         x,y              - destination coordinates inside the RastPort.
  670.         taglist          - pointer to an array of TagItems.
  671.         
  672.     TAGS
  673.         GGFX_SourceWidth - total width of source array [pixels]
  674.                            default: sourcewidth supplied with
  675.                            CreateDirectDrawHandleA()
  676.  
  677.     RESULTS
  678.         success          - TRUE if the call succeeded. failures are
  679.                            currently very unlikely, but you should be
  680.                            prepared. future implementations might
  681.                            differ and be more likely to fail due to
  682.                            a lack of memory.
  683.  
  684.     SEE ALSO
  685.         CreateDirectDrawHandleA(), DrawPictureA()
  686.  
  687.  
  688. guigfx.library/DoPictureMethodA               guigfx.library/DoPictureMethodA
  689.  
  690.     NAME
  691.         DoPictureMethodA - apply a method to a picture.
  692.         DoPictureMethod  - varargs stub for DoPictureMethodA.
  693.  
  694.     SYNOPSIS
  695.         result = DoPictureMethodA(picture,method,arguments)
  696.                                   a0      d0     a1
  697.  
  698.         ULONG DoPictureMethodA(APTR,ULONG,ULONG *)
  699.         
  700.         ULONG DoPictureMethod(APTR,ULONG,argument,...)
  701.  
  702.     FUNCTION
  703.         This function applies a method to a picture. Arguments and
  704.         results depend on the specified method.
  705.  
  706.     INPUTS
  707.         picture    - pointer to a picture
  708.         method     - method identifier (see below)
  709.         arguments  - pointer to a list of arguments (see below)
  710.  
  711.     METHODS
  712.  
  713.         PICMTHD_AUTOCROP    tags
  714.  
  715.                 crop the picture at its outmost borders with
  716.                 differing pixels. optionally limit the search
  717.                 for differing pixels to an area inside the picture.
  718.  
  719.                 TAGS
  720.                         GGFX_SourceX (ULONG)
  721.                                 left edge of the area to check [pixels]
  722.                                 Default: 0
  723.  
  724.                         GGFX_SourceY (ULONG)
  725.                                 top edge of the area to check [rows]
  726.                                 Default: 0
  727.  
  728.                         GGFX_SourceWidth (ULONG)
  729.                                 width of the area to check [pixels]
  730.                                 Default: the picture's width.
  731.  
  732.                         GGFX_SourceHeight (ULONG)
  733.                                 height of the area to check [rows]
  734.                                 Default: the picture's height.
  735.  
  736.                 RESULTS
  737.                         success (boolean)
  738.  
  739.  
  740.         PICMTHD_CREATEALPHAMASK        rgb, tags
  741.  
  742.                 this method creates an alpha-channel for the given picture.
  743.                 The alpha-channel will be the difference for each pixel in
  744.                 the picture against the specified 0x00rrggbb value.
  745.                 Optionally, a clip area inside the source picture may be
  746.                 specified.
  747.                 
  748.                 TAGS
  749.                         GGFX_SourceX (ULONG)
  750.                                 source left edge in the second picture
  751.                                 [pixels]. Default: 0
  752.  
  753.                         GGFX_SourceY (ULONG)
  754.                                 source top edge in the picture [rows].
  755.                                 Default: 0
  756.  
  757.                         GGFX_SourceWidth (ULONG)
  758.                                 width of an area in the picture [pixels].
  759.                                 Default: the picture's width.
  760.  
  761.                         GGFX_SourceHeight (ULONG)
  762.                                 height of an area in the picture [rows].
  763.                                 Default: the picture's height.
  764.  
  765.                 RESULTS
  766.                         success (boolean)
  767.  
  768.                 NOTES
  769.                         this method requires conversion to PIXFMT_0RGB_32
  770.                         (see annotations below)
  771.  
  772.                 SEE ALSO
  773.                         PICMTHD_SETALPHA
  774.  
  775.  
  776.         PICMTHD_CROP    x, y, width, height, tags
  777.         
  778.                 crop a picture to a rectangle defined throughout
  779.                 position (x|y) and dimensions (width|height)
  780.  
  781.                 TAGS
  782.                         none defined
  783.  
  784.                 RESULTS
  785.                         success (boolean)
  786.  
  787.  
  788.         PICMTHD_FLIPX    tags
  789.  
  790.                 flip image (or a part of it) horizontally.
  791.  
  792.                 TAGS
  793.                         GGFX_DestX (ULONG)
  794.                                 left edge of the area to flip [pixels]
  795.                                 Default: 0
  796.  
  797.                         GGFX_DestY (ULONG)
  798.                                 top edge of the area to flip [rows]
  799.                                 Default: 0
  800.  
  801.                         GGFX_DestWidth (ULONG)
  802.                                 width of the area to be flipped [pixels]
  803.                                 Default: the picture's width.
  804.  
  805.                         GGFX_DestHeight (ULONG)
  806.                                 height of the area to be flipped [rows]
  807.                                 Default: the picture's height.
  808.  
  809.                 RESULTS
  810.                         success (boolean)
  811.  
  812.  
  813.         PICMTHD_FLIPY    tags
  814.  
  815.                 flip image (or a part of it) vertically.
  816.  
  817.                 TAGS
  818.                         GGFX_DestX (ULONG)
  819.                                 left edge of the area to flip [pixels]
  820.                                 Default: 0
  821.  
  822.                         GGFX_DestY (ULONG)
  823.                                 top edge of the area to flip [rows]
  824.                                 Default: 0
  825.  
  826.                         GGFX_DestWidth (ULONG)
  827.                                 width of the area to be flipped [pixels]
  828.                                 Default: the picture's width.
  829.  
  830.                         GGFX_DestHeight (ULONG)
  831.                                 height of the area to be flipped [rows]
  832.                                 Default: the picture's height.
  833.  
  834.                 RESULTS
  835.                         success (boolean)
  836.  
  837.  
  838.         PICMTHD_INSERT  second_picture, tags
  839.         
  840.                 insert a second picture (or a part of it) to the current
  841.                 picture. Clip areas may be specified both inside the current
  842.                 and the second picture. The processed pixels will be scaled
  843.                 to the specified dimensions, if necessary.
  844.                 
  845.                 TAGS
  846.                         GGFX_SourceX (ULONG)
  847.                                 source left edge where to fetch the pixels
  848.                                 from in the second picture [pixels].
  849.                                 Default: 0
  850.  
  851.                         GGFX_SourceY (ULONG)
  852.                                 source top edge where to fetch the pixels
  853.                                 from in the second picture [rows].
  854.                                 Default: 0
  855.  
  856.                         GGFX_SourceWidth (ULONG)
  857.                                 width of an area in the second picture
  858.                                 [pixels]. Default: the second picture's
  859.                                 width.
  860.  
  861.                         GGFX_SourceHeight (ULONG)
  862.                                 height of an area in the second picture
  863.                                 [rows]. Default: the second picture's
  864.                                 height.
  865.  
  866.                         GGFX_DestX (ULONG)
  867.                                 destination left edge where to insert
  868.                                 the pixels into the current picture
  869.                                 [pixels]. Default: 0
  870.  
  871.                         GGFX_DestY (ULONG)
  872.                                 destination top edge where to insert
  873.                                 the pixels into the current picture
  874.                                 [rows]. Default: 0
  875.  
  876.                         GGFX_DestWidth (ULONG)
  877.                                 width to be inserted in the current picture.
  878.                                 [pixels]. Default: the current picture's width.
  879.  
  880.                         GGFX_DestHeight (ULONG)
  881.                                 height to be inserted in the current picture.
  882.                                 [rows]. Default: the current picture's height.
  883.                                 
  884.                 RESULTS
  885.                         success (boolean)
  886.  
  887.                 NOTES
  888.                         this method requires conversion to PIXFMT_0RGB_32
  889.                         (see annotations below)
  890.  
  891.  
  892.         PICMTHD_MAPDRAWHANDLE   drawhandle, tags
  893.  
  894.                 map a picture for optimized drawing to a drawhandle's
  895.                 RastPort. Drawing a picture via DrawPictureA() is much
  896.                 faster thereafter.
  897.  
  898.                 TAGS
  899.                         none defined
  900.  
  901.                 RESULTS
  902.                         success (boolean)
  903.  
  904.                 NOTES
  905.                         - The internal representation of a picture may
  906.                           change at any time. The specified pixel format
  907.                           is only valid until the next call to
  908.                           DoPictureMethodA(). Use GetPictureAttrsA() to
  909.                           find out about the current format.
  910.  
  911.                         - You risk to lose color information, i.e. when
  912.                           a truecolor picture has to be rendered to a
  913.                           8bit RastPort, for instance.
  914.  
  915.         PICMTHD_MIX     second_picture, tags
  916.         
  917.                 mix a second picture to the current picture. Clip areas
  918.                 may be specified both inside the current and the second
  919.                 picture. The processed pixels will be scaled to the
  920.                 specified dimensions, if necessary.
  921.                 
  922.                 TAGS
  923.                         GGFX_Ratio (ULONG)
  924.                                 mix ratio (0...255). Default: 128
  925.  
  926.                         GGFX_SourceX (ULONG)
  927.                                 source left edge where to fetch pixels
  928.                                 from in the second picture [pixels].
  929.                                 Default: 0
  930.  
  931.                         GGFX_SourceY (ULONG)
  932.                                 source top edge where to fetch pixels
  933.                                 from in the second picture [rows].
  934.                                 Default: 0
  935.  
  936.                         GGFX_SourceWidth (ULONG)
  937.                                 width of an area in the second picture
  938.                                 [pixels]. Default: the second picture's
  939.                                 width.
  940.  
  941.                         GGFX_SourceHeight (ULONG)
  942.                                 height of an area in the second picture
  943.                                 [rows]. Default: the second picture's
  944.                                 height.
  945.  
  946.                         GGFX_DestX (ULONG)
  947.                                 destination left edge where to apply
  948.                                 the operation to in the current picture
  949.                                 [pixels]. Default: 0
  950.  
  951.                         GGFX_DestY (ULONG)
  952.                                 destination top edge where to apply
  953.                                 the operation to in the current picture
  954.                                 [rows]. Default: 0
  955.  
  956.                         GGFX_DestWidth (ULONG)
  957.                                 width of an area for the operation to be
  958.                                 applied to in the current picture [pixels].
  959.                                 Default: the current picture's width.
  960.  
  961.                         GGFX_DestHeight (ULONG)
  962.                                 height of an area for the operation to be
  963.                                 applied to in the current picture [rows].
  964.                                 Default: the current picture's height.
  965.                                 
  966.                 RESULTS
  967.                         success (boolean)
  968.  
  969.                 NOTES
  970.                         this method requires conversion to PIXFMT_0RGB_32
  971.                         (see annotations below)
  972.  
  973.                 SEE ALSO
  974.                         PICMTHD_MIXALPHA
  975.  
  976.  
  977.         PICMTHD_MIXALPHA        secondpicture, tags
  978.         
  979.                 mix a second picture to the current picture via
  980.                 alpha-channel. Clip areas may be specified both inside
  981.                 the current and the second picture. The processed pixels
  982.                 will be scaled to the specified dimensions, if necessary.
  983.                 
  984.                 TAGS
  985.                         GGFX_SourceX (ULONG)
  986.                                 source left edge where to fetch pixels
  987.                                 from in the second picture [pixels].
  988.                                 Default: 0
  989.  
  990.                         GGFX_SourceY (ULONG)
  991.                                 source top edge where to fetch pixels
  992.                                 from in the second picture [rows].
  993.                                 Default: 0
  994.  
  995.                         GGFX_SourceWidth (ULONG)
  996.                                 width of an area in the second picture
  997.                                 [pixels]. Default: the second picture's
  998.                                 width.
  999.  
  1000.                         GGFX_SourceHeight (ULONG)
  1001.                                 height of an area in the second picture
  1002.                                 [rows]. Default: the second picture's
  1003.                                 height.
  1004.  
  1005.                         GGFX_DestX (ULONG)
  1006.                                 destination left edge where to apply
  1007.                                 the operation to in the current picture
  1008.                                 [pixels]. Default: 0
  1009.  
  1010.                         GGFX_DestY (ULONG)
  1011.                                 destination left edge where to apply
  1012.                                 the operation to in the current picture
  1013.                                 [rows]. Default: 0
  1014.  
  1015.                         GGFX_DestWidth (ULONG)
  1016.                                 width of an area for the operation to be
  1017.                                 applied to in the current picture [pixels].
  1018.                                 Default: the current picture's width.
  1019.  
  1020.                         GGFX_DestHeight (ULONG)
  1021.                                 height of an area for the operation to be
  1022.                                 applied to in the current picture [rows].
  1023.                                 Default: the current picture's height.
  1024.                                 
  1025.                 RESULTS
  1026.                         success (boolean)
  1027.  
  1028.                 NOTES
  1029.                         this method requires conversion to PIXFMT_0RGB_32
  1030.                         (see annotations below)
  1031.  
  1032.                 SEE ALSO
  1033.                         PICMTHD_SETALPHA, PICMTHD_MIX
  1034.  
  1035.  
  1036.         PICMTHD_NEGATIVE    tags
  1037.  
  1038.                 invert the colors of the picture (or a part of it)
  1039.  
  1040.                 TAGS
  1041.                         GGFX_DestX (ULONG)
  1042.                                 left edge of the area to invert [pixels]
  1043.                                 Default: 0
  1044.  
  1045.                         GGFX_DestY (ULONG)
  1046.                                 top edge of the area to invert [rows]
  1047.                                 Default: 0
  1048.  
  1049.                         GGFX_DestWidth (ULONG)
  1050.                                 width of the area to invert [pixels]
  1051.                                 Default: the picture's width.
  1052.  
  1053.                         GGFX_DestHeight (ULONG)
  1054.                                 height of the area to invert [rows]
  1055.                                 Default: the picture's height.
  1056.  
  1057.                 RESULTS
  1058.                         success (boolean)
  1059.  
  1060.                 NOTES
  1061.                         this method requires conversion to PIXFMT_0RGB_32
  1062.                         (see annotations below)
  1063.  
  1064.  
  1065.         PICMTHD_RENDER  pixelformat, tags
  1066.  
  1067.                 render a picture to a specified pixel format. Valid pixel
  1068.                 formats are as follows:
  1069.  
  1070.                         PIXFMT_CHUNKY_CLUT
  1071.                                 chunky bytes
  1072.                         
  1073.                         PIXFMT_0RGB_32
  1074.                                 ULONG 0x00rrggbb truecolor data
  1075.  
  1076.                         PIXFMT_RGB_24
  1077.                                 UBYTE 0xrr,0xgg,0xbb truecolor data
  1078.                 
  1079.                 TAGS
  1080.                         none defined
  1081.                         
  1082.                 RESULTS
  1083.                         success (boolean)
  1084.  
  1085.                 NOTES
  1086.                         - The internal representation of a picture may
  1087.                           change at any time. The specified pixel format
  1088.                           is only valid until the next call to
  1089.                           DoPictureMethodA(). Use GetPictureAttrsA() to
  1090.                           find out about the current format.
  1091.  
  1092.                         - You risk to lose color information, i.e. when
  1093.                           a truecolor picture is rendered to
  1094.                           PIXFMT_CHUNKY_CLUT.
  1095.  
  1096.  
  1097.         PICMTHD_SCALE   width, height, tags
  1098.         
  1099.                 scale a picture to the specified dimensions.
  1100.                 
  1101.                 TAGS
  1102.                         none defined
  1103.  
  1104.                 RESULTS
  1105.                         success (boolean)
  1106.                         
  1107.                 NOTE
  1108.                         This function fails if applied to a static
  1109.                         buffer, and when the image needs to grow. In this
  1110.                         case, specify GGFX_Independent or set a larger
  1111.                         buffer with GGFX_BufferSize when creating the
  1112.                         picture with MakePictureA().
  1113.  
  1114.  
  1115.         PICMTHD_SET     rgb, tags
  1116.         
  1117.                 set a picture (or a part of it) to the specified
  1118.                 RGB value.
  1119.  
  1120.                 TAGS
  1121.                         GGFX_DestX (ULONG)
  1122.                                 destination left edge [pixels]
  1123.                                 Default: 0
  1124.  
  1125.                         GGFX_DestY (ULONG)
  1126.                                 destination top edge [rows]
  1127.                                 Default: 0
  1128.  
  1129.                         GGFX_DestWidth (ULONG)
  1130.                                 width to be affected [pixels]
  1131.                                 Default: the picture's width.
  1132.  
  1133.                         GGFX_DestHeight (ULONG)
  1134.                                 height to be affected [rows]
  1135.                                 Default: the picture's height.
  1136.  
  1137.                 RESULTS
  1138.                         success (boolean)
  1139.                 
  1140.                 NOTES
  1141.                         if you apply this method to a picture of the
  1142.                         format PIXFMT_CHUNKY_CLUT, it cannot be
  1143.                         guaranteed that the specified RGB value
  1144.                         is exactly hit. you can use PICMTHD_RENDER
  1145.                         in order to convert the picture to
  1146.                         PIXFMT_0RGB_32 before. 
  1147.  
  1148.  
  1149.         PICMTHD_SETALPHA        alpha-array, width, height, tags
  1150.  
  1151.                 set an alpha-channel array for the current picture.
  1152.                 The alpha-channel is a plain array of chunky-bytes,
  1153.                 defining a mixing ratio for each pixel. The
  1154.                 alpha-channel array will be scaled to fit exactly to
  1155.                 the current picture, unless you specify other
  1156.                 dimensions. Passing a NULL pointer for alpha-array
  1157.                 will discard an existing alpha-channel.
  1158.  
  1159.                 TAGS
  1160.                         GGFX_DestX (ULONG)
  1161.                                 destination left edge where to insert
  1162.                                 the alpha-channel into the current
  1163.                                 picture [pixels]. Default: 0
  1164.  
  1165.                         GGFX_DestY (ULONG)
  1166.                                 destination top edge where to insert
  1167.                                 the alpha-channel into the current
  1168.                                 picture [rows]. Default: 0
  1169.  
  1170.                         GGFX_DestWidth (ULONG)
  1171.                                 width to be inserted to the current
  1172.                                 picture [pixels]. Default: the current
  1173.                                 picture's width.
  1174.  
  1175.                         GGFX_DestHeight (ULONG)
  1176.                                 height to be inserted to the current
  1177.                                 picture [rows]. Default: the current
  1178.                                 picture's height.
  1179.  
  1180.                 RESULTS
  1181.                         success (boolean)
  1182.                 
  1183.                 NOTES
  1184.                         this method requires conversion to PIXFMT_0RGB_32
  1185.                         (see annotations below)
  1186.  
  1187.                 SEE ALSO
  1188.                         PICMTHD_CREATEALPHAMASK
  1189.  
  1190.  
  1191.         PICMTHD_TEXTURE  texturepic, coordinates, tags
  1192.         
  1193.                 draw a texture to the current picture, texture-mapped
  1194.                 via an array of coordinates. texturepic is a pointer to
  1195.                 a picture that contains the texture, coordinates is a
  1196.                 pointer to an array of 4 WORD pairs of x/y coordinates
  1197.                 each. They form a trapezoid inside the current picture
  1198.                 for the texture picture to be mapped to. border clipping
  1199.                 is fully implemented.
  1200.  
  1201.                 TAGS
  1202.                         GGFX_SourceX (ULONG)
  1203.                                 source left edge inside the texture
  1204.                                 [pixels]. Default: 0
  1205.  
  1206.                         GGFX_SourceY (ULONG)
  1207.                                 source top edge inside the texture
  1208.                                 [rows]. Default: 0
  1209.  
  1210.                         GGFX_SourceWidth (ULONG)
  1211.                                 texture width [pixels]. Default:
  1212.                                 the texturepic's width.
  1213.  
  1214.                         GGFX_SourceHeight (ULONG)
  1215.                                 texture height [rows]. Default:
  1216.                                 the texturepic's height.
  1217.  
  1218.                         GGFX_DestX (ULONG)
  1219.                                 destination left edge where to apply
  1220.                                 the trapezoid to the current picture
  1221.                                 [pixels]. Default: 0
  1222.  
  1223.                         GGFX_DestY (ULONG)
  1224.                                 destination top edge where to apply
  1225.                                 the trapezoid to the current picture
  1226.                                 [rows]. Default: 0
  1227.  
  1228.                         GGFX_DestWidth (ULONG)
  1229.                                 maximum width to be inserted to the
  1230.                                 current picture [pixels]. Default: the
  1231.                                 current picture's width.
  1232.  
  1233.                         GGFX_DestHeight (ULONG)
  1234.                                 maximum height to be inserted to the
  1235.                                 current picture [rows]. Default: the
  1236.                                 current picture's height.
  1237.                         
  1238.                 RESULTS
  1239.                         success (boolean)
  1240.  
  1241.                 NOTES
  1242.                         this method depends on both pictures to be in
  1243.                         the same format. DoPictureMethodA() tries to
  1244.                         convert either of the involved pictures to the
  1245.                         other's format. (see annotations below)
  1246.  
  1247.                 SEE ALSO
  1248.                         render.library texture-mapping documentation
  1249.  
  1250.  
  1251.         PICMTHD_TINTALPHA       rgb, tags
  1252.         
  1253.                 tint the picture with the given 0x00rrggbb. the mixing
  1254.                 ratio is defined throughout the picture's alpha-channel.
  1255.                 
  1256.                 TAGS
  1257.                         GGFX_DestX (ULONG)
  1258.                                 destination left edge where to apply
  1259.                                 the operation [pixels]. Default: 0
  1260.  
  1261.                         GGFX_DestY (ULONG)
  1262.                                 destination left edge where to apply
  1263.                                 the operation [rows]. Default: 0
  1264.  
  1265.                         GGFX_DestWidth (ULONG)
  1266.                                 width of an area for the operation to be
  1267.                                 applied to [pixels].
  1268.                                 Default: the picture's width.
  1269.  
  1270.                         GGFX_DestHeight (ULONG)
  1271.                                 height of an area for the operation to be
  1272.                                 applied to [rows].
  1273.                                 Default: the picture's height.
  1274.  
  1275.                 RESULTS
  1276.                         success (boolean)
  1277.  
  1278.                 NOTES
  1279.                         this method requires conversion to PIXFMT_0RGB_32
  1280.                         (see annotations below)
  1281.  
  1282.                 SEE ALSO
  1283.                         PICMTHD_TINT, PICMTHD_MIXALPHA
  1284.  
  1285.  
  1286.         PICMTHD_TINT     rgb, tags
  1287.         
  1288.                 tint the picture with the given 0x00rrggbb value, and
  1289.                 optionally with a specific ratio.
  1290.                 
  1291.                 TAGS
  1292.                         GGFX_Ratio (ULONG)
  1293.                                 mix ratio (0...255). Default: 128
  1294.  
  1295.                         GGFX_DestX (ULONG)
  1296.                                 destination left edge where to apply
  1297.                                 the operation [pixels]. Default: 0
  1298.  
  1299.                         GGFX_DestY (ULONG)
  1300.                                 destination left edge where to apply
  1301.                                 the operation [rows]. Default: 0
  1302.  
  1303.                         GGFX_DestWidth (ULONG)
  1304.                                 width of an area for the operation to be
  1305.                                 applied to [pixels].
  1306.                                 Default: the picture's width.
  1307.  
  1308.                         GGFX_DestHeight (ULONG)
  1309.                                 height of an area for the operation to be
  1310.                                 applied to [rows].
  1311.                                 Default: the picture's height.
  1312.  
  1313.                 RESULTS
  1314.                         success (boolean)
  1315.  
  1316.                 NOTES
  1317.                         this method requires conversion to PIXFMT_0RGB_32
  1318.                         (see annotations below)
  1319.  
  1320.                 SEE ALSO
  1321.                         PICMTHD_TINTALPHA, PICMTHD_MIXALPHA
  1322.  
  1323.  
  1324.     RESULTS
  1325.         result     - return value (specific for the applied method)
  1326.  
  1327.     NOTES
  1328.         Methods that require conversion to PIXFMT_0RGB_32 will fail in
  1329.         a static buffer, i.e. when the picture was created with
  1330.         MakePictureA() in the format PIXFMT_CHUNKY_CLUT, and without
  1331.         a buffer overhang or GGFX_Independent. See MakePictureA() for
  1332.         further details.
  1333.         
  1334.     SEE ALSO
  1335.         MakePictureA(), ObtainDrawHandleA(), DrawPictureA()
  1336.  
  1337.  
  1338. guigfx.library/DrawPictureA                       guigfx.library/DrawPictureA
  1339.  
  1340.     NAME
  1341.         DrawPictureA - draw a picture to a drawhandle.
  1342.         DrawPicture  - varargs stub for DrawPictureA.
  1343.  
  1344.     SYNOPSIS
  1345.         success = DrawPictureA(drawhandle,picture,x, y, tags)
  1346.         d0                     a0         a1      d0 d1 a2
  1347.  
  1348.         BOOL DrawPictureA(APTR,APTR,UWORD,UWORD,struct TagItem *)
  1349.  
  1350.         BOOL DrawPicture(APTR,APTR,UWORD,UWORD,tag,...,TAG_DONE)
  1351.  
  1352.     FUNCTION
  1353.         This function draws a picture to the RastPort associated with
  1354.         a drawhandle. Optionally, the picture will be scaled to the
  1355.         specified dimensions. A clip area inside the picture may be
  1356.         specified as well.
  1357.  
  1358.     INPUTS
  1359.         drawhandle  - pointer to a drawhandle from ObtainDrawHandleA()
  1360.         picture     - pointer to a picture
  1361.         x           - left edge inside the RastPort [pixels]
  1362.         y           - top edge inside the RastPort [rows]
  1363.         tags        - pointer to an array of TagItems
  1364.  
  1365.     TAGS
  1366.         GGFX_SourceX (ULONG)
  1367.                 left edge inside the picture where to fetch the pixels
  1368.                 from [pixels]. Default: 0.
  1369.  
  1370.         GGFX_SourceY (ULONG)
  1371.                 top edge inside the picture where to fetch the pixels
  1372.                 from [rows]. Default: 0.
  1373.  
  1374.         GGFX_SourceWidth (ULONG)
  1375.                 width of an area inside the picture [pixels].
  1376.                 Default: The picture's width.
  1377.  
  1378.         GGFX_SourceHeight (ULONG)
  1379.                 height of an area inside the picture [rows].
  1380.                 Default: The picture's height.
  1381.  
  1382.         GGFX_DestWidth (ULONG)
  1383.                 destination width for the picture to be drawn [pixels].
  1384.                 Default: the picture's width.
  1385.  
  1386.         GGFX_DestHeight (ULONG)
  1387.                 destination height for the picture to be drawn [rows].
  1388.                 Default: the picture's height.
  1389.  
  1390.         GGFX_CallBackHook (struct Hook *)
  1391.                 pointer to a callback Hook structure. The associated
  1392.                 callback function will be called from time to time
  1393.                 while the picture is being drawn.
  1394.                 The callback has to return TRUE for continuation or FALSE
  1395.                 for abortion. It will be submitted a pointer to the
  1396.                 picture for the object, and a message of the following
  1397.                 type:
  1398.  
  1399.                         ULONG GGFX_MSGTYPE_LINEDRAWN
  1400.                         ULONG line_number
  1401.                 
  1402.                 Also refer to the example below.
  1403.                 Default: NULL.
  1404.  
  1405.         GGFX_DitherMode (ULONG) - dither mode. Currently available are:
  1406.  
  1407.                 DITHERMODE_NONE
  1408.                         no dithering at all
  1409.                 
  1410.                 DITHERMODE_FS
  1411.                         Floyd-Steinberg dithering
  1412.                         
  1413.                 DITHERMODE_RANDOM
  1414.                         Random dithering. This mode is significantly
  1415.                         slower than Floyd-Steinberg dithering.
  1416.  
  1417.                 DITHERMODE_EDD
  1418.                         EDD dithering. This mode is faster than
  1419.                         Floyd-Steinberg dithering.
  1420.                         
  1421.                 Default: The drawhandle's dithermode.
  1422.  
  1423.         GGFX_DitherAmount (ULONG) - dither amount. Valid range: 0...255.
  1424.                 Currently, this value is of any use only for
  1425.                 DITHERMODE_RANDOM. Default: The drawhandle's dither amount.
  1426.  
  1427.         GGFX_AutoDither (BOOL) - automatic dither activation.
  1428.                 temporarily overrides the drawhandle's autodither
  1429.                 state - see ObtainDrawHandleA().
  1430.                 default: the drawhandle's autodither state.
  1431.         
  1432.         GGFX_RastLock (struct SignalSemaphore *) - pointer to an
  1433.                 initialized exec.library SignalSemaphore which is
  1434.                 used for RastPort sharing between tasks. if you want
  1435.                 to draw to the drawhandle's RastPort while another
  1436.                 task is rendering to this RastPort with DrawPictureA(),
  1437.                 you must supply this argument and enclose all accesses
  1438.                 to the RastPort with ObtainSemaphore()/ReleaseSemaphore()
  1439.                 pairs. default: NULL (v16)
  1440.          
  1441.         RND_DestCoordinates (WORD *) - Pointer to an array of coordinates
  1442.                 for texturemapped drawing. This array consists of 4 WORD pairs
  1443.                 of x/y coordinates each. The array forms a trapezoid inside the
  1444.                 destination rectangle. Any parameters are valid, since clipping
  1445.                 is fully implemented. Texture-mapping and drawing are performed
  1446.                 in a single pass, and there are no additional buffers allocated.
  1447.                 Note that rotation can be easily implemented with this feature,
  1448.                 since rotation is merely a special case of texture-mapping.
  1449.                 See also the documentation of ObtainDrawHandleA()/GGFX_BGColor.                
  1450.                 Default - NULL. (v16)
  1451.  
  1452.     RESULTS
  1453.         success     - TRUE if the picture could be drawn, FALSE
  1454.                       if there was not enough memory available.
  1455.                       Another reason for this function to fail is that
  1456.                       the optional callback hook returned FALSE.
  1457.  
  1458.     NOTES
  1459.         There is almost no overhead for scaling. Scaling is extremely
  1460.         fast and may be considered 'gratis'.
  1461.  
  1462.     EXAMPLE
  1463.         The callback hook allows to interrupt DrawPictureA() at any time. A
  1464.         simple callback function might look like this:
  1465.  
  1466.         ULONG __saveds __asm abortdrawfunc(register __a0 struct Hook *hook)
  1467.         {
  1468.             ULONG abortsignal = 1 << *((BYTE *) (hook->h_Data));
  1469.             if (SetSignal(0, 0) & abortsignal)
  1470.             {
  1471.                 return FALSE;
  1472.             }
  1473.             else
  1474.             {
  1475.                 return TRUE;
  1476.             }
  1477.         }
  1478.         
  1479.         In this example, an abortion signal was allocated and made available
  1480.         to the function via h_Data. If the signal arrives, the callback
  1481.         function returns FALSE to DrawPictureA(), and drawing will be
  1482.         interrupted.
  1483.         
  1484.         Note: Not all internal drawing-routines actually execute the hook
  1485.         function more than once. This mainly depends on the typical speed
  1486.         for a particular drawing routine or certain graphics.library or
  1487.         cybergraphics.library implementations. At least it is supported
  1488.         when scaling and rendering is involved to the drawing process.
  1489.  
  1490.     SEE ALSO
  1491.         ObtainDrawHandleA(), CreatePictureBitMapA()
  1492.  
  1493.  
  1494. guigfx.library/GetPictureAttrsA               guigfx.library/GetPictureAttrsA
  1495.  
  1496.     NAME
  1497.         GetPictureAttrsA - get picture attributes.
  1498.         GetPictureAttrs  - varargs stub for GetPictureAttrsA.
  1499.  
  1500.     SYNOPSIS
  1501.         count = GetPictureAttrsA(picture,tags)
  1502.         d0                       a0      a1
  1503.  
  1504.         ULONG GetPictureAttrsA(APTR,struct TagItem *)
  1505.  
  1506.         ULONG GetPictureAttrs(APTR,tag,...,TAG_DONE)
  1507.  
  1508.     FUNCTION
  1509.         This function obtains a list of picture attributes. It
  1510.         returns the number of attributes that have been retrieved
  1511.         actually.
  1512.  
  1513.     INPUTS
  1514.         picture     - pointer to a picture
  1515.         tags        - pointer to an array of TagItems
  1516.  
  1517.     TAGS
  1518.         PICATTR_Width (ULONG *)
  1519.                 The picture's width [pixels]
  1520.  
  1521.         PICATTR_Height (ULONG *)
  1522.                 The picture's height [rows]
  1523.  
  1524.         PICATTR_PixelFormat (ULONG *)
  1525.                 The picture's internal pixel format. Currently this
  1526.                 can be PIXFMT_CHUNKY_CLUT, PIXFMT_0RGB_32, or
  1527.                 PIXFMT_RGB_24.
  1528.  
  1529.         PICATTR_RawData (APTR *)
  1530.                 Pointer to the picture's raw data. Operate on the raw
  1531.                 pixel array only with knowledge of the actual pixel
  1532.                 format. Warning: The internal representation of a picture
  1533.                 may change with every call to DoPictureMethodA() or
  1534.                 drawing functions.
  1535.  
  1536.         PICATTR_AspectX (ULONG *)
  1537.                 Horizontal pixel aspect.
  1538.  
  1539.         PICATTR_AspectY (ULONG *)
  1540.                 Vertical pixel aspect.
  1541.  
  1542.         PICATTR_AlphaPresent (BOOL)
  1543.                 indicates if an alpha-channel is present.
  1544.  
  1545.     RESULTS
  1546.         count  - the number of attributes that could be retrieved.
  1547.  
  1548.  
  1549. guigfx.library/IsPictureA                           guigfx.library/IsPictureA
  1550.  
  1551.     NAME
  1552.         IsPictureA - determine whether a file is a picture or not. (v4)
  1553.         IsPicture  - varargs stub for IsPictureA.
  1554.  
  1555.     SYNOPSIS
  1556.         ispicture = IsPictureA(filename,tags)
  1557.         d0                     a0       a1
  1558.  
  1559.         BOOL IsPictureA(char *,struct TagItem *)
  1560.  
  1561.         BOOL IsPicture(char *,tag,...,TAG_DONE)
  1562.  
  1563.     FUNCTION
  1564.         This function checks if the specified file could be loaded
  1565.         as a picture with LoadPictureA().
  1566.  
  1567.     INPUTS
  1568.         filename    - name of the file to be checked
  1569.         tags        - pointer to an array of TagItems
  1570.  
  1571.     TAGS
  1572.  
  1573.     RESULTS
  1574.         ispicture   - TRUE if the specified file is recognized
  1575.                       as a picture that could be loaded with
  1576.                       LoadPictureA().
  1577.  
  1578.     SEE ALSO
  1579.         LoadPictureA()
  1580.  
  1581.  
  1582. guigfx.library/LoadPictureA                       guigfx.library/LoadPictureA
  1583.  
  1584.     NAME
  1585.         LoadPictureA - load a picture file.
  1586.         LoadPicture  - varargs stub for LoadPictureA.
  1587.  
  1588.     SYNOPSIS
  1589.         picture = LoadPictureA(filename,tags)
  1590.         d0                     a0       a1
  1591.  
  1592.         APTR LoadPictureA(char *,struct TagItem *)
  1593.  
  1594.         APTR LoadPicture(char *,tag,...,TAG_DONE)
  1595.  
  1596.     FUNCTION
  1597.         This function loads a picture. Currently, this is implemented
  1598.         via picture.class datatypes.
  1599.  
  1600.     INPUTS
  1601.         filename    - name of the file to be loaded
  1602.         tags        - pointer to an array of TagItems
  1603.  
  1604.     TAGS
  1605.         GGFX_ErrorCode (LONG *)
  1606.                 Pointer to a variable that will receive a standard DOS
  1607.                 error code. This will be NULL if loading was successful.
  1608.                 Default: NULL
  1609.         
  1610.         GGFX_UseMask (ULONG) (v15)
  1611.                 boolean to indicate whether a transparency color,
  1612.                 an alpha-channel or a mask (if present) should be
  1613.                 inserted to the picture. Note: This tag requires the
  1614.                 picture to be converted to PIXFMT_0RGB_32.
  1615.                 Default: FALSE              
  1616.  
  1617.         GGFX_HSType (ULONG) - picture's internal histogram type, according
  1618.                 to the histogram types defined in render/render.h.
  1619.                 Better you never touch this tag, unless you know exactly
  1620.                 what you are doing. Consider reading the 'memory' text
  1621.                 file supplied with the render.library distribution.
  1622.                 You do not need this tag under normal circumstances.
  1623.                 Default: not defined (will be set to the pen-sharemap's
  1624.                 histogram type, or to the default type when needed)
  1625.  
  1626.     RESULTS
  1627.         picture  - pointer to a picture or NULL if something went wrong.
  1628.                    The exact reason for failure can be obtained via the
  1629.                    GGFX_ErrorCode tag.
  1630.  
  1631.     NOTES
  1632.         - As for current datatype implementations, alpha-channels
  1633.         do not seem to be supported. The datatype might translate
  1634.         it to a single bitplane.
  1635.         guigfx.library, on the other hand, does not (yet) support
  1636.         single-bitplane masks, so masks and transparency colors will
  1637.         be translated to alpha-channels.
  1638.                    
  1639.     SEE ALSO
  1640.         DeletePicture(), IsPictureA(), MakePictureA(), ReadPictureA()
  1641.  
  1642.  
  1643. guigfx.library/LockPictureA                       guigfx.library/LockPictureA
  1644.  
  1645.     NAME
  1646.         LockPictureA - lock picture attributes. (v3)
  1647.         LockPicture  - varargs stub for LockPictureA.
  1648.         
  1649.         *** obsolete ***
  1650.  
  1651.     SYNOPSIS
  1652.         success = LockPictureA(picture,flags,arguments)
  1653.         d0                     a0      d0    a1
  1654.  
  1655.         BOOL LockPictureA(APTR,ULONG,ULONG *)
  1656.         
  1657.         BOOL LockPicture(APTR,ULONG,argument,...)
  1658.  
  1659.     FUNCTION
  1660.         This function locks certain picture attributes and
  1661.         prevents the picture from internal conversions that
  1662.         affect the specified flags.
  1663.  
  1664.     INPUTS
  1665.         picture     - pointer to a picture
  1666.         flags       - locking flags
  1667.         arguments   - flag-specific arguments
  1668.  
  1669.     FLAGS
  1670.         LOCKMODE_DRAWHANDLE drawhandle
  1671.         
  1672.                 lock the picture to the specified drawhandle.
  1673.                 this leads to optimized drawing without the
  1674.                 need to render. combine with LOCKMODE_FORCE
  1675.                 if you want to lock the image even if color
  1676.                 information would be lost.
  1677.  
  1678.     RESULTS
  1679.         success  - TRUE if locking was successful, FALSE if
  1680.                    locking is not possible, or if locking
  1681.                    required a conversion with loss of
  1682.                    color information.
  1683.  
  1684.     NOTES
  1685.         This function is currently (v4) not working, and it
  1686.         will always return FALSE. If you need optimized drawing,
  1687.         use the method PICMTHD_MAPDRAWHANDLE instead.
  1688.  
  1689.     SEE ALSO
  1690.         UnLockPicture(), DoPictureMethodA()
  1691.  
  1692.  
  1693. guigfx.library/MakePictureA                       guigfx.library/MakePictureA
  1694.  
  1695.     NAME
  1696.         MakePictureA - make a picture from raw data or from a BitMap.
  1697.         MakePicture  - varargs stub for MakePictureA.
  1698.  
  1699.     SYNOPSIS
  1700.         picture = MakePictureA(data,width,height,tags)
  1701.         d0                     a0   d0    d1     a1
  1702.  
  1703.         APTR MakePictureA(APTR,UWORD,UWORD,struct TagItem *)
  1704.  
  1705.         APTR MakePicture(APTR,UWORD,UWORD,tag,...,TAG_DONE)
  1706.  
  1707.     FUNCTION
  1708.         This function makes a picture from an array of raw
  1709.         data (or a part of it), or from a BitMap structure
  1710.         (or a part of it). Optionally, memory is allocated
  1711.         for a 'blank' picture. Optionally, the picture will
  1712.         be scaled.
  1713.  
  1714.         Raw data is not incorporated to the picture, instead
  1715.         it is referenced at its original location in memory,
  1716.         unless you specify the tag GGFX_Independent. (This does
  1717.         not apply to BitMap structures - pictures created from
  1718.         BitMaps are always independent.)
  1719.  
  1720.         If GGFX_Independent is not specified (and your picture
  1721.         is taken from its original location in memory), you may
  1722.         additionally specify a buffer 'overhang' with the tag
  1723.         GGFX_BufferSize. This allows internal conversions which
  1724.         require the image to grow at its original location in
  1725.         memory. You must be the owner of that memory, of course.
  1726.  
  1727.     INPUTS
  1728.         data    - pointer to
  1729.                   - an array of truecolor data,
  1730.                   - an array of chunky pixels,
  1731.                   - a BitMap structure
  1732.                   or NULL.
  1733.         width   - total width of the source array or BitMap [pixels]
  1734.         height  - total height of the source array or BitMap [rows]
  1735.         tags    - pointer to an array of TagItems
  1736.  
  1737.     TAGS
  1738.         GGFX_PixelFormat (ULONG) - pixel format. Currently defined are
  1739.  
  1740.                 PIXFMT_CHUNKY_CLUT
  1741.                         chunky bytes, directly acting as indices
  1742.                         to a color-lookup-table.
  1743.                 
  1744.                 PIXFMT_0RGB_32
  1745.                         truecolor pixels (ULONG 0xaarrggbb).
  1746.  
  1747.                 PIXFMT_BITMAP_CLUT
  1748.                         a BitMap structure with normal palette lookup.
  1749.                         You must also specify the GGFX_Palette and
  1750.                         GGFX_NumColors tags.
  1751.  
  1752.                 PIXFMT_BITMAP_HAM8
  1753.                         a BitMap structure with HAM8 color lookup.
  1754.                         You must also specify the GGFX_Palette and
  1755.                         GGFX_NumColors tags.
  1756.  
  1757.                 PIXFMT_BITMAP_HAM6
  1758.                         a BitMap structure with HAM6 color lookup.
  1759.                         You must also specify the GGFX_Palette and
  1760.                         GGFX_NumColors tags.
  1761.  
  1762.                 PIXFMT_BITMAP_RGB
  1763.                         a BitMap structure which is assumed to contain
  1764.                         truecolor data. This may apply to CyberGraphX
  1765.                         bitmaps.
  1766.  
  1767.                 Default: PIXFMT_CHUNKY_CLUT               
  1768.  
  1769.  
  1770.         GGFX_Palette (APTR) - pointer to a color table. If this
  1771.                 tag is not specified with PIXFMT_CHUNKY_CLUT, a
  1772.                 default palette of 256 grey tones will be generated.
  1773.                 Default: NULL
  1774.  
  1775.         GGFX_NumColors (ULONG) - number of colors in the color table.
  1776.                 This tag is mandatory when GGFX_Palette is specified
  1777.                 (see above). Default: not defined
  1778.                 
  1779.         GGFX_PaletteFormat (ULONG) - format of the palette. Currently
  1780.                 defined are:
  1781.                       
  1782.                 PALFMT_RGB8
  1783.                         ULONG 0x00rrggbb
  1784.  
  1785.                 PALFMT_RGB32
  1786.                         ULONG red,green,blue. This is the LoadRGB32()
  1787.                         format without trailing longword.
  1788.  
  1789.                 Default: PALFMT_RGB8
  1790.  
  1791.         GGFX_SourceX (ULONG) - left edge of an area inside the array
  1792.                 or BitMap [pixels]. Default: 0.
  1793.  
  1794.         GGFX_SourceY (ULONG) - top edge of an area inside the array
  1795.                 or BitMap [rows]. Default: 0.
  1796.  
  1797.         GGFX_SourceWidth (ULONG) - width of an area inside the array
  1798.                 or BitMap [pixels]. Default: width.
  1799.         
  1800.         GGFX_SourceHeight (ULONG) - height of an area inside the array
  1801.                 or BitMap [rows]. Default: height.
  1802.  
  1803.         GGFX_DestWidth (ULONG) - destination width of the resulting
  1804.                 picture [pixels]. Default: GGFX_SourceWidth.
  1805.         
  1806.         GGFX_DestHeight (ULONG) - destination height for the resulting
  1807.                 picture [rows]. Default: GGFX_SourceHeight.
  1808.  
  1809.         GGFX_BufferSize (ULONG) - total size of the specified buffer
  1810.                 in bytes. This defines an 'oversized' buffer for the
  1811.                 array of pixels. It informs the picture to what size
  1812.                 it may grow for internal conversions.
  1813.                 This tag is ignored when you supply a BitMap structure,
  1814.                 or when GGFX_Independent is specified.
  1815.                 Default: Required size in bytes
  1816.                 for width * height * bytes_per_pixel.
  1817.  
  1818.         GGFX_AspectX (ULONG) - picture's horizontal aspect.
  1819.                 Default: 1
  1820.  
  1821.         GGFX_AspectY (ULONG) - picture's vertical aspect.
  1822.                 Default: 1
  1823.  
  1824.         GGFX_AlphaPresent (BOOL) - flag to indicate that the array
  1825.                 contains alpha-channel information. This tag is only
  1826.                 considered with PIXFMT_0RGB_32. Default: FALSE
  1827.  
  1828.         GGFX_Independent (BOOL) - If set to TRUE, the pixel array will
  1829.                 always be copied to a seperate buffer that is maintained
  1830.                 with the picture internally. This tag is meaningless when
  1831.                 the input data is a BitMap structure. Default: FALSE
  1832.  
  1833.         GGFX_HSType (ULONG) - picture's internal histogram type, according
  1834.                 to the histogram types defined in render/render.h.
  1835.                 Better you never touch this tag, unless you know exactly
  1836.                 what you are doing. Consider reading the 'memory' text
  1837.                 file supplied with the render.library distribution.
  1838.                 You do not need this tag under normal circumstances.
  1839.                 Default: not defined (will be set to a pensharemap's
  1840.                 histogram type, or to the default type when needed)
  1841.  
  1842.     RESULTS
  1843.         picture  - pointer to a picture or NULL if something went wrong.
  1844.  
  1845.     SEE ALSO
  1846.         DeletePicture(), LoadPictureA(), ReadPictureA()
  1847.  
  1848.  
  1849. guigfx.library/ObtainDrawHandleA             guigfx.library/ObtainDrawHandleA
  1850.  
  1851.     NAME
  1852.         ObtainDrawHandleA - obtain a handle for drawing.
  1853.         ObtainDrawHandle  - varargs stub for ObtainDrawHandleA.
  1854.  
  1855.     SYNOPSIS
  1856.         drawhandle = ObtainDrawHandleA(pensharemap,rastport,colormap,tags)
  1857.         d0                             a0          a1       a2       a3
  1858.  
  1859.         APTR ObtainDrawHandleA(APTR,struct RastPort *,struct ColorMap *,
  1860.                                struct TagItem *)
  1861.  
  1862.         APTR ObtainDrawHandle(APTR,struct RastPort *,struct ColorMap *,
  1863.                               tag,...,TAG_DONE)
  1864.  
  1865.     FUNCTION
  1866.         This function obtains a drawhandle for drawing to a RastPort.
  1867.         Depending on the RastPort's environment, pens may be allocated
  1868.         from the ColorMap.
  1869.  
  1870.         Before a pen-sharemap is passed to this function, it has to
  1871.         be loaded with colors via AddPictureA(), AddPaletteA(), and/or
  1872.         AddPixelArrayA(). Otherwise ObtainDrawHandleA() returns NULL.
  1873.         
  1874.         Optionally, you may specify NULL for the pen-sharemap argument,
  1875.         in which case a drawhandle for a static palette will be
  1876.         generated.
  1877.  
  1878.     INPUTS
  1879.         pensharemap - pointer to a pen-sharemap created with
  1880.                       CreatePenShareMapA(), or NULL.
  1881.         rastport    - pointer to a RastPort
  1882.         colormap    - pointer to a ColorMap. Usually, this is
  1883.                       screen->ViewPort.ColorMap of the rastport's screen.
  1884.         tags        - pointer to an array of TagItems
  1885.  
  1886.     TAGS
  1887.         OBP_Precision (ULONG) - precision for pen allocations,
  1888.                 according to the definitions in graphics/view.h.
  1889.                 See also graphics.library/ObtainBestPenA().
  1890.                 Default: PRECISION_IMAGE.
  1891.                 
  1892.                 Note: The default precision suffices for almost every
  1893.                 application. ObtainDrawHandleA() obtains pens in an
  1894.                 extremely effective way. You get excellent results
  1895.                 even with lower precisions. Commodore's idea with
  1896.                 ObtainBestPenA() was to create a fair and effective
  1897.                 pen-sharing mechanism, and ObtainDrawHandleA() behaves
  1898.                 in perfect accordance to this intention. Never use
  1899.                 insane patches for ObtainBestPenA().
  1900.                 
  1901.         GGFX_DitherMode (ULONG) - dither mode. Currently available are:
  1902.  
  1903.                 DITHERMODE_NONE
  1904.                         no dithering at all
  1905.                 
  1906.                 DITHERMODE_FS
  1907.                         Floyd-Steinberg dithering
  1908.                         
  1909.                 DITHERMODE_RANDOM
  1910.                         Random dithering. This mode is significantly
  1911.                         slower than Floyd-Steinberg dithering.
  1912.  
  1913.                 DITHERMODE_EDD
  1914.                         EDD dithering. This mode is faster than
  1915.                         Floyd-Steinberg dithering.
  1916.                 
  1917.                 Default: DITHERMODE_FS.
  1918.  
  1919.         GGFX_DitherAmount (ULONG) - dither amount. Valid range: 0...255.
  1920.                 Currently this value is of any use only for
  1921.                 DITHERMODE_RANDOM. Default: 40
  1922.  
  1923.         GGFX_AutoDither (BOOL) - automatic dither activation.
  1924.                 If set to TRUE, dithering is automatically activated for
  1925.                 drawing a particular picture to a particular environment,
  1926.                 when the loss of color information would exceed a certain
  1927.                 threshold (see below). Default: TRUE
  1928.  
  1929.         GGFX_DitherThreshold (ULONG) - threshold for automatic dithering.
  1930.                 The lower, the earlier automatic dithering is activated.
  1931.                 Useful thresholds range between 10 and 10000. Refer to
  1932.                 render.library/RGBArrayDiversityA() for further details.
  1933.                 better you do not use this tag unless you have a good
  1934.                 reason to. let the user customize it with the environment
  1935.                 variable AUTODITHERTHRESHOLD. Default: 250
  1936.  
  1937.         GGFX_MaxAllocPens (ULONG) - limit for the number of pens to be
  1938.                 allocated from the ColorMap. Do not use this feature
  1939.                 unless you have a good reason to. Valid range: 0...256.
  1940.                 Default: not defined
  1941.  
  1942.         GGFX_ModeID (ULONG) - screen's modeID. Currently, this is required
  1943.                 for guigfx.library to detect HAM modes. The full HAM
  1944.                 color range can be achieved only with this tag specified.
  1945.                 Default: INVALID_ID (no HAM detection takes place)
  1946.         
  1947.         GGFX_BGColor (ULONG) - RGB of an optional background color. it
  1948.                 will be considered when a picture is being drawn with
  1949.                 texture-mapping/rotating enabled, and there are areas
  1950.                 inside the destination rectangle on the rastport which are
  1951.                 not covered by the resulting picture. these areas will be
  1952.                 rendered with this color. see also
  1953.                 DrawPictureA()/RND_DestCoordinates for further details.
  1954.                 default: 0xffffff (v16)
  1955.                 
  1956.     RESULTS
  1957.         drawhandle - pointer to a handle for drawing to rastports.
  1958.                      NULL if something went wrong.
  1959.  
  1960.     SEE ALSO
  1961.         ReleaseDrawHandle(), CreatePenShareMapA(), DrawPictureA(),
  1962.         graphics.library/ObtainBestPenA(),
  1963.         render.library/RGBArrayDiversityA()
  1964.  
  1965.  
  1966. guigfx.library/ReadPictureA                       guigfx.library/ReadPictureA
  1967.  
  1968.     NAME
  1969.         ReadPictureA - read a picture from a RastPort.
  1970.         ReadPicture  - varargs stub for ReadPictureA.
  1971.  
  1972.     SYNOPSIS
  1973.         picture = ReadPictureA(rastport,colormap,x, y, width,height,tags)
  1974.         d0                     a0       a1       d0 d1 d2    d3     a2
  1975.  
  1976.         APTR ReadPictureA(struct RastPort *,struct ColorMap *,UWORD,UWORD,
  1977.                           UWORD,UWORD,struct TagItem *)
  1978.  
  1979.         APTR ReadPicture(struct RastPort *,struct ColorMap *,UWORD,UWORD,
  1980.                          UWORD,UWORD,tag,...,TAG_DONE)
  1981.  
  1982.     FUNCTION
  1983.         This function reads a picture from a RastPort (or a part of it),
  1984.         and optionally scales it to the specified dimensions.
  1985.  
  1986.     INPUTS
  1987.         rastport - pointer to a RastPort where to fetch the pixels from
  1988.         colormap - pointer to a ColorMap where to fetch color information
  1989.                    from. Usually this is screen->ViewPort.ColorMap of the
  1990.                    specified RastPort's Screen.
  1991.         x        - left edge in the RastPort [pixels]
  1992.         y        - top edge in the RastPort [rows]
  1993.         width    - width of the area to be read [pixels]
  1994.         height   - height of the area to be read [rows]
  1995.         tags     - pointer to an array of TagItems
  1996.  
  1997.     TAGS
  1998.         GGFX_DestWidth (ULONG) - destination width [pixels].
  1999.                 Default: width.
  2000.         
  2001.         GGFX_DestHeight (ULONG) - destination height [rows].
  2002.                 Default: height.
  2003.         
  2004.         GGFX_AspectX (ULONG) - horizontal pixel aspect for the resulting
  2005.               picture. Default: 1
  2006.  
  2007.         GGFX_AspectY (ULONG) - vertical pixel aspect for the resulting
  2008.               picture. Default: 1
  2009.  
  2010.         GGFX_ModeID (ULONG) - screen's mode ID. currently required for
  2011.               determining HAM rastports. Default: none
  2012.        
  2013.         GGFX_HSType (ULONG) - picture's internal histogram type, according
  2014.                 to the histogram types defined in render/render.h.
  2015.                 Better you never touch this tag, unless you know exactly
  2016.                 what you are doing. Consider reading the 'memory' text
  2017.                 file supplied with the render.library documentation.
  2018.  
  2019.     RESULTS
  2020.         picture  - pointer to a picture or NULL if not enough memory.
  2021.  
  2022.     SEE ALSO
  2023.         LoadPictureA(), MakePictureA()
  2024.  
  2025.  
  2026. guigfx.library/ReleaseDrawHandle             guigfx.library/ReleaseDrawHandle
  2027.  
  2028.     NAME
  2029.         ReleaseDrawHandle - free a drawhandle.
  2030.  
  2031.     SYNOPSIS
  2032.         ReleaseDrawHandle(drawhandle)
  2033.                           a0
  2034.  
  2035.         void ReleaseDrawHandle(APTR)
  2036.  
  2037.     FUNCTION
  2038.         This function discards a drawhandle, frees associated memory, and
  2039.         returns allocated pens (if any) to the related ColorMap.
  2040.  
  2041.     INPUTS
  2042.         drawhandle    - drawhandle obtained via ObtainDrawHandleA()
  2043.         
  2044.     SEE ALSO
  2045.         ObtainDrawHandleA()
  2046.  
  2047.  
  2048. guigfx.library/RemColorHandle                   guigfx.library/RemColorHandle
  2049.  
  2050.     NAME
  2051.         RemColorHandle - manually remove a colorhandle.
  2052.  
  2053.     SYNOPSIS
  2054.         RemColorHandle(colorhandle)
  2055.                        a0
  2056.  
  2057.         void RemColorHandle(APTR)
  2058.  
  2059.     FUNCTION
  2060.         This function removes particular color information from
  2061.         a pen-sharemap. Further calls to ObtainDrawHandleA() may
  2062.         lead to different pen allocations then.
  2063.  
  2064.     INPUTS
  2065.         colorhandle    - pointer to a colorhandle from
  2066.                          AddPictureA(), AddPaletteA(),
  2067.                          or AddPixelArrayA()
  2068.  
  2069.     NOTE
  2070.         DeletePenShareMap() arbitrarily frees all its
  2071.         colorhandles. There is no need to manually remove
  2072.         them. This function is only required if you wish to
  2073.         modify a pen-sharemap and then call ObtainDrawHandleA()
  2074.         again.
  2075.         
  2076.         Calling RemColorHandle() for colorhandles that have
  2077.         been removed with DeletePenShareMap() will be fatal.
  2078.  
  2079.     SEE ALSO
  2080.         AddPictureA(), AddPaletteA(), AddPixelArrayA(),
  2081.         DeletePenShareMap(), ObtainDrawHandleA()
  2082.  
  2083.  
  2084. guigfx.library/UnLockPicture                     guigfx.library/UnLockPicture
  2085.  
  2086.     NAME
  2087.         UnLockPicture - unlock picture attributes (v3)
  2088.  
  2089.         *** obsolete ***
  2090.  
  2091.     SYNOPSIS
  2092.         UnLockPicture(picture,flags)
  2093.                       a0      d0
  2094.  
  2095.         UnLockPicture(APTR,ULONG)
  2096.  
  2097.     FUNCTION
  2098.         This function frees picture attributes that have been
  2099.         locked with LockPictureA().
  2100.  
  2101.     INPUTS
  2102.         picture     - pointer to a picture
  2103.         flags       - flags to unlock
  2104.  
  2105.     RESULTS
  2106.         none
  2107.  
  2108.     SEE ALSO
  2109.         LockPictureA()
  2110.  
  2111.     NOTES
  2112.         This function will currently (v4) do nothing. Read
  2113.         the annotations in LockPictureA().
  2114.